<?php
class advertisers{
	public function init($params=array()){
		$this->db=$this->yum->library('mysql');
		$this->prefix=$this->yum->vars('app','prefix');
	}
    public function GAd($params=array()){
    	return $this->db->select($this->prefix.'advertisers AS A',$params);
    }
	public function IAd($params,$mode=0){
		$params['time']=time();
		return $this->db->insert($this->prefix.'advertisers',$params,$mode);
	}
	public function UAd($params){
		return $this->db->update($this->prefix.'advertisers',$params);
	}
}
?>